#ifndef __IIC_H__
#define __IIC_H__


sbit SCL = P1^6;
sbit SDA = P1^7;


unsigned char i2cstrout[I2C_LENGTH];
unsigned char i2cstrin[I2C_LENGTH];




void i2cstart(void);
void i2cstop(void);
unsigned char waitack(void);
void sendack(void);
void sendnotack(void);
void i2csendbyte( unsigned char ch);
unsigned char i2creceivebyte(void);
unsigned char  i2cread(unsigned char page, unsigned char address, unsigned char  size);
unsigned char i2cwrite(unsigned char page,unsigned char address,unsigned char size);


void delay( unsigned int i);


#endif